<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: nars.storage.Memory.ReasonerBatch.textInputLine</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_a2f22be33d98b4366712ff91b93c2be8a.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="contents">
<a class="anchor" id="a2f22be33d98b4366712ff91b93c2be8a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nars.storage.Memory.ReasonerBatch.textInputLine </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>text</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>To process a line of input text. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="../../db/d0c/Memory_8java_source.html#l01000">1000</a> of file <a class="el" href="../../db/d0c/Memory_8java_source.html">Memory.java</a>.</p>

<p>References <a class="el" href="../../d5/da0/Symbols_8java_source.html#l00084">nars.io.Symbols.COMMENT_MARK</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00104">nars.storage.Memory.getExportStrings()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00218">nars.storage.Memory.inputTask()</a>, <a class="el" href="../../d7/dcd/StringParser_8java_source.html#l00061">nars.io.StringParser.parseExperience()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00887">nars.storage.Memory.ReasonerBatch.reset()</a>, <a class="el" href="../../d5/da0/Symbols_8java_source.html#l00083">nars.io.Symbols.RESET_MARK</a>, and <a class="el" href="../../db/d0c/Memory_8java_source.html#l00936">nars.storage.Memory.ReasonerBatch.walk()</a>.</p>
<div class="fragment"><div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;                                               {</div>
<div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;            <span class="keywordflow">if</span> (!text.isEmpty()) {</div>
<div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160;                <span class="keywordtype">char</span> c = text.charAt(0);</div>
<div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160;                <span class="keywordflow">switch</span> (c) {</div>
<div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160;                    <span class="keywordflow">case</span> <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols.html">Symbols</a>.<a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a5eb6e55e05ec108b04cba52bfc05606e.html#a5eb6e55e05ec108b04cba52bfc05606e">RESET_MARK</a>:</div>
<div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160;                        <a class="code" href="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_af9b0f156f3063b99421e768fa4a1e09c.html#af9b0f156f3063b99421e768fa4a1e09c">reset</a>();</div>
<div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160;                        <a class="code" href="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_ace7395287f9f294a67f4c1bc296577a5.html#ace7395287f9f294a67f4c1bc296577a5">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a1a17565c7b06ca4ecc1ed57c3fce973f.html#a1a17565c7b06ca4ecc1ed57c3fce973f">getExportStrings</a>().add(text);</div>
<div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;                        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;                    <span class="keywordflow">case</span> <a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols.html">Symbols</a>.<a class="code" href="../../dc/d71/classnars_1_1io_1_1Symbols_a47730a5d7d9ab257452f5ed89c32e8ba.html#a47730a5d7d9ab257452f5ed89c32e8ba">COMMENT_MARK</a>:</div>
<div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;                        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;                    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;                        <span class="comment">// read NARS language or an integer : TODO duplicated code</span></div>
<div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;                        <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;                            <span class="keywordtype">int</span> i = Integer.parseInt(text);</div>
<div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160;                            <a class="code" href="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_ab6ffd0604cc72ffaf292957cfa4207d4.html#ab6ffd0604cc72ffaf292957cfa4207d4">walk</a>(i);</div>
<div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>&#160;                        } <span class="keywordflow">catch</span> (NumberFormatException e) {</div>
<div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;                            Task task = <a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser.html">StringParser</a>.<a class="code" href="../../d3/dca/classnars_1_1io_1_1StringParser_a37ff864d959aba58138170a3f9a3e7c8.html#a37ff864d959aba58138170a3f9a3e7c8">parseExperience</a>(<span class="keyword">new</span> StringBuffer(text), <a class="code" href="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_ace7395287f9f294a67f4c1bc296577a5.html#ace7395287f9f294a67f4c1bc296577a5">memory</a>, <a class="code" href="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_a47d57493de829c91533d002059ae1200.html#a47d57493de829c91533d002059ae1200">clock</a>);</div>
<div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160;                            <span class="keywordflow">if</span> (task != null) {</div>
<div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;                                <a class="code" href="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_ace7395287f9f294a67f4c1bc296577a5.html#ace7395287f9f294a67f4c1bc296577a5">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_aced4c4f51d46fb7046111aac85deffdc.html#aced4c4f51d46fb7046111aac85deffdc">inputTask</a>(task);</div>
<div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160;                            }</div>
<div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;                        }</div>
<div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160;                        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160;                }</div>
<div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160;            }</div>
<div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160;        }</div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1ReasonerBatch_a47d57493de829c91533d002059ae1200_html_a47d57493de829c91533d002059ae1200"><div class="ttname"><a href="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_a47d57493de829c91533d002059ae1200.html#a47d57493de829c91533d002059ae1200">nars.storage.Memory.ReasonerBatch.clock</a></div><div class="ttdeci">long clock</div><div class="ttdoc">System clock, relatively defined to guarantee the repeatability of behaviors. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00865">Memory.java:865</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_html"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser.html">nars.io.StringParser</a></div><div class="ttdoc">Parse input String into Task or Term. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00036">StringParser.java:36</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a5eb6e55e05ec108b04cba52bfc05606e_html_a5eb6e55e05ec108b04cba52bfc05606e"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a5eb6e55e05ec108b04cba52bfc05606e.html#a5eb6e55e05ec108b04cba52bfc05606e">nars.io.Symbols.RESET_MARK</a></div><div class="ttdeci">static final char RESET_MARK</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00083">Symbols.java:83</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_html"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols.html">nars.io.Symbols</a></div><div class="ttdoc">The ASCII symbols used in I/O. </div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00026">Symbols.java:26</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1ReasonerBatch_af9b0f156f3063b99421e768fa4a1e09c_html_af9b0f156f3063b99421e768fa4a1e09c"><div class="ttname"><a href="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_af9b0f156f3063b99421e768fa4a1e09c.html#af9b0f156f3063b99421e768fa4a1e09c">nars.storage.Memory.ReasonerBatch.reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">Reset the system with an empty memory and reset clock. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00887">Memory.java:887</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1ReasonerBatch_ace7395287f9f294a67f4c1bc296577a5_html_ace7395287f9f294a67f4c1bc296577a5"><div class="ttname"><a href="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_ace7395287f9f294a67f4c1bc296577a5.html#ace7395287f9f294a67f4c1bc296577a5">nars.storage.Memory.ReasonerBatch.memory</a></div><div class="ttdeci">Memory memory</div><div class="ttdoc">The memory of the reasoner. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00859">Memory.java:859</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1Symbols_a47730a5d7d9ab257452f5ed89c32e8ba_html_a47730a5d7d9ab257452f5ed89c32e8ba"><div class="ttname"><a href="../../dc/d71/classnars_1_1io_1_1Symbols_a47730a5d7d9ab257452f5ed89c32e8ba.html#a47730a5d7d9ab257452f5ed89c32e8ba">nars.io.Symbols.COMMENT_MARK</a></div><div class="ttdeci">static final char COMMENT_MARK</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/da0/Symbols_8java_source.html#l00084">Symbols.java:84</a></div></div>
<div class="ttc" id="classnars_1_1io_1_1StringParser_a37ff864d959aba58138170a3f9a3e7c8_html_a37ff864d959aba58138170a3f9a3e7c8"><div class="ttname"><a href="../../d3/dca/classnars_1_1io_1_1StringParser_a37ff864d959aba58138170a3f9a3e7c8.html#a37ff864d959aba58138170a3f9a3e7c8">nars.io.StringParser.parseExperience</a></div><div class="ttdeci">static Task parseExperience(StringBuffer buffer, Memory memory, long time)</div><div class="ttdoc">Parse a line of input experience. </div><div class="ttdef"><b>Definition:</b> <a href="../../d7/dcd/StringParser_8java_source.html#l00061">StringParser.java:61</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a1a17565c7b06ca4ecc1ed57c3fce973f_html_a1a17565c7b06ca4ecc1ed57c3fce973f"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a1a17565c7b06ca4ecc1ed57c3fce973f.html#a1a17565c7b06ca4ecc1ed57c3fce973f">nars.storage.Memory.getExportStrings</a></div><div class="ttdeci">List&lt; String &gt; getExportStrings()</div><div class="ttdoc">List of Strings or Tasks to be sent to the output channels. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00104">Memory.java:104</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_aced4c4f51d46fb7046111aac85deffdc_html_aced4c4f51d46fb7046111aac85deffdc"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_aced4c4f51d46fb7046111aac85deffdc.html#aced4c4f51d46fb7046111aac85deffdc">nars.storage.Memory.inputTask</a></div><div class="ttdeci">void inputTask(Task task)</div><div class="ttdoc">Input task processing. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00218">Memory.java:218</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_1_1ReasonerBatch_ab6ffd0604cc72ffaf292957cfa4207d4_html_ab6ffd0604cc72ffaf292957cfa4207d4"><div class="ttname"><a href="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_ab6ffd0604cc72ffaf292957cfa4207d4.html#ab6ffd0604cc72ffaf292957cfa4207d4">nars.storage.Memory.ReasonerBatch.walk</a></div><div class="ttdeci">void walk(int n)</div><div class="ttdoc">Will carry the inference process for a certain number of steps. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00936">Memory.java:936</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch_a2f22be33d98b4366712ff91b93c2be8a_a2f22be33d98b4366712ff91b93c2be8a_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d7/d81/namespacenars.html">nars</a></li><li class="navelem"><a class="el" href="../../de/ddc/namespacenars_1_1storage.html">storage</a></li><li class="navelem"><a class="el" href="../../d8/df4/classnars_1_1storage_1_1Memory.html">Memory</a></li><li class="navelem"><a class="el" href="../../dd/da5/classnars_1_1storage_1_1Memory_1_1ReasonerBatch.html">ReasonerBatch</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:04:00 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
